"use strict"


//引包
const express=require("express");
const path=require("path");

//引控制器
const accountCtrl=require(path.join(__dirname,"../controller/accountCtrl.js"));

//创建路由
const accountRouter=express.Router();




//配置路由

//获得登录页面
accountRouter.get("/login",accountCtrl.getLoginPage);

//post提交登录
accountRouter.post("/login",accountCtrl.getLogin);

//退出
accountRouter.get("/logout",accountCtrl.logout);

//获取注册页面
accountRouter.get("/register",accountCtrl.getRegisterPage);

//注册提交
accountRouter.post("/register",accountCtrl.register);




//导出
module.exports = accountRouter